package com.y.mytest.collection.stream;

import java.awt.*;
import java.util.Arrays;
import java.util.stream.Stream;

/**
 * @ClassName SteamOf
 * @Description
 * @Author YeZiHao
 * @Date 2022/8/7 14:34
 **/
public class SteamOf {
    public static void main(String[] args) {
        String attr = "直营";
        System.out.println(Arrays.asList("直营", "联营").contains(attr));
        System.out.println(Stream.of("直营", "联营").anyMatch(attr::equals));
    }
}
